package com.maniu.butterknife_anno;

import java.lang.reflect.Constructor;
/**
* author： suliang
* 2022/9/23 10:39
* describe : 调用 bind 方法用于绑定生成对应方法
*/
public class ButterKnife {
    public static void bind(Object activity){
        String name = activity.getClass().getName() + "_java_binder";
        try{
            Class<?> aClass = Class.forName(name);
            Constructor<?> constructor = aClass.getConstructor(activity.getClass());
            constructor.newInstance(activity);
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}